package models;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import play.db.jpa.Model;
/**
 * 实体类 - 招聘信息类
 * */
@Entity
@Table(name="employment")
public class Employment extends Model{
	
	@OneToMany(cascade = CascadeType.ALL,mappedBy="employment")
	public Set<Staff> staffs = new HashSet<Staff>();
	@Column(name="emp_tit",length=150)
	public String empTit;                            //标题
	@Column(name="emp_det",columnDefinition="text")
    @Basic(fetch=FetchType.LAZY)
	public String empDet;                            //信息详情	
	@Column(name="emp_date")
	@Temporal(TemporalType.DATE)
	public Date empDate;                             //发布日期
	
	public String toString(){
		return empTit;
	}
}
